﻿namespace net.zxteam.ZXLexer.Rules.Internal
{
	using net.zxteam.ZXLexer.Tokens;
	using System.Diagnostics.Contracts;

	internal sealed class CardinalRule : ContainerRuleBase, ICardinalRule
	{
		internal CardinalRule(IRule parentRule)
			: base(parentRule)
		{
		}

		public override IToken Accept(IRuleVisitor visitor)
		{
			Contract.Requires(visitor != null);

			return visitor.VisitCardinalRule(this);
		}
	}
}
